<?php
@header('Content-type: text/plain');
require_once('psalmfunctions.php');
$title = $_REQUEST['title'];
$glorybe = $_REQUEST['glorybe'];
$ms = $_REQUEST['ms']; // "Mediant Syllables"
$ts = $_REQUEST['ts']; // "Termination Syllables"
$source = $_REQUEST['source'];
$edition = $_REQUEST['edition'];
$keepVerseNumbers = $_REQUEST['keepVerseNumbers'];
$result = psalmRef($title, Array($ms, $ts), $glorybe, $source, $edition, true, $keepVerseNumbers, false, true);
if($result[0] == '{') {
  header("Content-type: application/json");
}
echo $result;
?>